import { MockMethod } from 'vite-plugin-mock'

const foodMock: MockMethod[] = [
  {
    url: '/home-service/food/origin',
    method: 'get',
    response: () => {
      return ['中餐']
    }
  },
  {
    url: '/home-service/food/summary/page',
    method: 'get',
    response: () => {
      return {
        current: 1,
        pages: 1,
        records: [
          {
            id: 614660173221957,
            name: '鱼头汤',
            recommendRate: 5,
            workList: [
              {
                finishBy: '哥哥',
                finishTime: '2024-11-13',
                id: 614673962934342,
                imageUrl: 'files\\food\\image2.png'
              },
              {
                finishBy: '哥哥',
                finishTime: '2024-11-20',
                id: 614673962934341,
                imageUrl: 'files\\food\\image1.png'
              }
            ]
          },
          {
            id: 614665900060741,
            name: '红烧肉',
            recommendRate: 3,
            workList: []
          },
          {
            id: 614668663291973,
            name: '红烧排骨',
            recommendRate: 5,
            workList: []
          }
        ],
        size: 6,
        total: 3
      }
    }
  },
  {
    url: '/home-service/food/614660173221957',
    method: 'get',
    response: () => {
      return {
        attention: '',
        category: '淮扬菜',
        cuisine: '清炖',
        id: 614660173221957,
        materialList: [
          {
            amount: '一个鱼头',
            id: 614673962901573,
            name: '胖头鱼',
            type: '主料'
          },
          {
            amount: '一块',
            id: 614673962901574,
            name: '豆腐',
            type: '辅料'
          },
          {
            amount: '1小块',
            id: 614673962901575,
            name: '生姜',
            type: '调料'
          },
          {
            amount: '2勺',
            id: 614673962901576,
            name: '生抽',
            type: '调料'
          }
        ],
        name: '鱼头汤',
        nutritiveValue: '',
        origin: '中餐',
        recommendRate: 5,
        remark: null,
        stepList: [{
          content: '先把鱼头剁开',
          id: 614673962917957,
          imageUrl: '',
          sort: 0
        },
        {
          content: '洗鱼',
          id: 614673962917958,
          imageUrl: '',
          sort: 1
        },
        {
          content: '倒水放砂锅里煮',
          id: 614673962917959,
          imageUrl: '',
          sort: 2
        },
        {
          content: '放豆腐',
          id: 614673962917960,
          imageUrl: '',
          sort: 3
        },
        {
          content: '放盐',
          id: 614673962917961,
          imageUrl: '',
          sort: 4
        }],
        workList: [
          {
            finishBy: '哥哥',
            finishTime: '2024-11-20',
            id: 614673962934341,
            imageUrl: 'files\\food\\image1.png'
          }
        ]
      }
    }
  },
  {
    url: '/home-service/food/stats/category',
    method: 'get',
    response: () => {
      return [{
        name: '淮扬菜',
        value: 3
      },
      {
        name: '鲁菜',
        value: 2
      }]
    }
  },
  {
    url: '/home-service/food/stats/cuisine',
    method: 'get',
    response: () => {
      return [{
        name: '清炖',
        value: 3
      },
      {
        name: '红烧',
        value: 2
      }]
    }
  }]

export default foodMock
